﻿@{
   }
<script type="text/javascript">
    var contentHeight_Permission_WorkFlowSet_Index = 0;
    $(document).ready(function () {
        //计算分栏高度
        contentHeight_Permission_WorkFlowSet_Index = $("#tabContent").innerHeight() - $(".panelBar",navTab.getCurrentPanel()).outerHeight();
        $("#mainContent_Permission_WorkFlowSet_Index").height(contentHeight_Permission_WorkFlowSet_Index);

        GridGet_Permission_WorkFlowSet_Index();
    });
    function GridGet_Permission_WorkFlowSet_Index() {
        $("#List_Permission_WorkFlowSet_Index").jqGrid({
            url: "/Permission/WorkFlowSet/GetProjectList",
            datatype: "json",
            mtype: "post",
            colNames: ['Id', '项目编号', '项目名称', '项目公司名称', '操作'],
            colModel: [
                        { name: 'PRJINFO_ID', index: 'PRJINFO_ID', sortable: false, hidden: true },
                        { name: 'PRJINFO_CODE', index: 'PRJINFO_CODE', width: 100, align: "center", sortable: false },
                        { name: 'PRJINFO_NAME', index: 'PRJINFO_NAME', width: 200, align: "left", sortable: false },
                        { name: 'PRJINFO_OWNER', index: 'PRJINFO_OWNER', width: 180, align: "left", sortable: false },
                        { name: "PRJINFO_ID", index: "PRJINFO_ID", width: 100, align: "center", sortable: false, hidden: false, formatter: SetGridButtons }
                       ], //PRJINFO_ISLOCK
            beforeRequest: function (d) {
                $(this).jqGrid('setGridParam', { postData: { "queryText": ""} });
            },
            loadError: function (xhr, status) {
                alertMsg.error(xhr.responseText);
            },
            loadComplete: function (xhr) {
                var ajaxbg = $("#background,#progressBar,#lui_List_Permission_WorkFlowSet_Index");
                ajaxbg.hide();
            },
            autowidth: true,
            rownumbers: true,
            shrinkToFit: true,
            multiselect: false,
            multiselectWidth: 50,
            sortable: false,
            viewrecords: true,
            sortorder: "desc",
            jsonReader: {
                repeatitems: false
            },
            rowNum: 20,
            pager: '#pager_Permission_WorkFlowSet_Index',
            rowList: [10, 20, 50],
            altRows: true,
            height: contentHeight_Permission_WorkFlowSet_Index - 50
        });
    }

    function SetGridButtons(cellvalue, options, rowData) {
        var doit = "<a style='font-size:12px;margin-left:20px;color:red'  alt='流程配置' href=\"javascript:WF_Permission_WorkFlowSet_Index_Index(" + cellvalue + ");\">流程配置</a>";
        return doit;
    }
    //打开工作流配置
    function WF_Permission_WorkFlowSet_Index_Index(id) {
        navTab.openTab("WorkFlowSL_Index", "/WorkFlow/WorkflowConfig/Index/" + id, { title: "流程配置" });
        return void (0);
    }
           
</script>
<div class="page">    
    <div id="mainContent_Permission_WorkFlowSet_Index" style="border-top:1px solid #d9d9d9;">
        @*<div class="tableList" layouth="10">*@
            <table id="List_Permission_WorkFlowSet_Index">
            </table>
            <div id="pager_Permission_WorkFlowSet_Index">
            </div>
        @*</div>*@
    </div>
</div>

